package thread.queue;

import java.util.Random;

/**
 * Created by xu on 2021/12/5.
 */
public class Producer implements Runnable {

    private Store store;





    public Producer(Store store) {
        this.store = store;
    }

    @Override
    public void run() {
        while (true){
            try {
                store.produce(String.valueOf(new Random().nextInt(10000)));
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
